﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Xinkui.Common {
    public class SystemConst {
        public class CookieConst {
            public static readonly string LoginUser = "LOGINUSERXINKUI";
            public static readonly string LoginUserName = "LOGINUSERXINKUINAME";
        }

        public class UIConst {
            public const string EmptyImageFor60 = "";
            public const string EmptyImageFor80 = "";
            public const string EmptyImageFor100 = "";
            public const string EmptyImageFor200 = "uploads/products/h01.jpg";
            public const string EmptyImageFor400 = "";
            public const string EmptyImageForDef = "";
        }

        public class AjaxCommandConst {
            public const int GET_USER_EXISTS = 1000;

            public const int GET_COMMON_LISTPROVINCE = 2010;

            public const int GET_COMMON_LISTAREA = 2020;

            public const int GET_COMMON_CATEGORY = 2030;


            public const int POST_CONTACT_COMPANY = 100;

            public const int POST_CONTACT_PRODUCT = 200;
        }

        public class CacheConst {

            const string CACHE_PREFIX = "Apsoto_Common";
            const string CACHE_CONTACT_CHAR = "_";


            public static string GetCompanyKey(int companyId) {
                return string.Intern(string.Concat(CACHE_PREFIX, CACHE_CONTACT_CHAR, "CIF", CACHE_CONTACT_CHAR, companyId));
            }

            public static string GetCompanyCertificateKey(int companyId) {
                return string.Intern(string.Concat(CACHE_PREFIX, CACHE_CONTACT_CHAR, "CIFCE", CACHE_CONTACT_CHAR, companyId));
            }

            public static string GetCompanyEquipmentKey(int companyId) {
                return string.Intern(string.Concat(CACHE_PREFIX, CACHE_CONTACT_CHAR, "CIFEQ", CACHE_CONTACT_CHAR, companyId));
            }

            public static string GetUserKey(int companyId) {
                return string.Intern(string.Concat(CACHE_PREFIX, CACHE_CONTACT_CHAR, "USERC", CACHE_CONTACT_CHAR, companyId));
            }

            public static string GetShowRoomCategoryKey(int companyId) {
                return string.Intern(string.Concat(CACHE_PREFIX, CACHE_CONTACT_CHAR, "SRCGBC", CACHE_CONTACT_CHAR, companyId));
            }

            public static string GetCountryDictKey() {
                return string.Intern(string.Concat(CACHE_PREFIX, CACHE_CONTACT_CHAR, "COUNTRY"));
            }

            public static string GetProvinceDictKey() {
                return string.Intern(string.Concat(CACHE_PREFIX, CACHE_CONTACT_CHAR, "PROVINCE"));
            }

            public static string GetCityDictKey() {
                return string.Intern(string.Concat(CACHE_PREFIX, CACHE_CONTACT_CHAR, "CITY"));
            }

            public static string GetCommonDictKey(int type) {
                return string.Intern(string.Concat(CACHE_PREFIX, CACHE_CONTACT_CHAR, "DICT", CACHE_CONTACT_CHAR, type));
            }

            public static string GetCategoryKey() {
                return string.Intern(string.Concat(CACHE_PREFIX, CACHE_CONTACT_CHAR, "CATEGORY"));
            }

        }

    }
}
